#ifndef BASICITEM_H
#define BASICITEM_H
#include<iostream>
#include<string>
#include"entry.h"
#include<map>
class basic_item
{

public:
	basic_item(std::string id = "", std::string content = "");
	void set_id(std::string);
	void set_content(std::string);
	entry get_id()const;
	entry get_content()const;
	virtual entry get_type()const = 0;
	virtual void console_input();
	virtual void database_input(std::map<std::string, std::string>&);
	virtual std::string to_console_str()const;
	virtual std::string to_db_str()const;
	virtual ~basic_item()
	{};
private:
	entry id;
	entry content;
};

class task :public basic_item
{
public:
	task();
	static entry type;
	static entry name;
	void set_ddl(std::string);
	entry get_ddl();
	~task()
	{};
	entry get_type()const;
	void console_input();
	std::string to_console_str()const;
	std::string to_db_str()const;
	void database_input(std::map<std::string, std::string>&);
private:
	entry ddl;
};
class activity :public basic_item
{
public:
	activity();
	static entry type;
	static entry name;
	void set_start_time(std::string);
	entry get_start_time();
	void set_end_time(std::string);
	entry get_end_time();
	~activity()
	{};
	entry get_type()const;
	void console_input();
	std::string to_console_str()const;
	std::string to_db_str()const;
	void database_input(std::map<std::string, std::string>&);
private:
	entry start_time;
	entry end_time;
};
#endif
